{{#isNullable}}
if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}} != null)
    {{#lambda.paste}}{{/lambda.paste}}
else
    writer.WriteNull("{{baseName}}");
{{/isNullable}}
{{^isNullable}}
{{#lambda.paste}}
{{/lambda.paste}}
{{/isNullable}}